module vfs.documentmanager;

import std.path;
import vfs.documenttype;

class DocumentManager {
    public static DocumentType getTypeFromPath(in string path) {
        with (DocumentType) {
            switch (getExt(path)) {
                case "d":
                    return D_FILE;
                case "c":
                case "cpp":
                case "h":
                case "hpp":
                    return C_FILE;
                case "xml":
                case "html":
                    return XML_FILE;
                default:
                    return PLAIN_TEXT;
            }
        }
    }

    private this() {
    }
}
